P0: repair FAT relay-bench runtime latency - #265
Conversation
|
Relay-bench P0 Gate 1 is green at Passed:
Gate 1 repairs report-backed analog Value 1/Value 2 latency and removes per-event physical disk barriers while keeping final journal durability/seal verification. Proceeding to the next isolated gate: fast FAT attach to an already-live shared Engineering Static DataSet/RCB acquisition session. PR remains draft and must not merge before physical relay acceptance. |
|
P0 LIVE VALUE + Command Panel gate completed on
Full CI green:
ARIEC61850 source was not modified; immutable pin remains PR intentionally remains draft. Physical relay-bench Start/capture/Recapture/command/LIVE VALUE acceptance is still required before merge. |
P0 locked-scope verification — LIVE VALUE + stable Command PanelRe-verified the current PR head
Full CI on this exact head is green:
No additional code churn is warranted for this locked P0. PR should remain draft until physical-relay acceptance; P1 remains out of scope until that gate is stable. |
Repair status update — current head
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 849be91469
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Flush only on the background writer. This makes newly written evidence | ||
| // visible to readers without ever stalling the WPF/report callback thread. | ||
| if (wroteAny) | ||
| _writer.Flush(); |
There was a problem hiding this comment.
Preserve durability before accepting evidence
When ARSAS or the host loses power before Stop/Close, this background loop only calls StreamWriter.Flush(), which makes records visible but does not preserve the prior FileStream.Flush(flushToDisk: true) durability guarantee. Because Append now returns as soon as it queues an envelope and the controller immediately promotes that evidence, an arbitrarily long running FAT session can present accepted evidence whose journal records are still only in the OS cache and may disappear after a crash; retain a background durable barrier before records are treated as accepted, even if barriers are batched.
Useful? React with 👍 / 👎.
| // Structural snapshot only. Queue drain + durable flush + full read-back are | ||
| // still running and the lifecycle caller must await AwaitDeferredSealsAsync(). | ||
| return deferred.Provisional; |
There was a problem hiding this comment.
Do not report a pending seal as verified
During the new deferred Stop/StopAll paths, IoTestSessionController.Stop() disposes the journal and immediately calls VerifySealedJournal(), so this pending branch returns an IsValid=true provisional result and the controller reports the session as verified/stopped before any queue drain, durable flush, or read-back has succeeded. If the later seal fails, AwaitDeferredSealsAsync() only causes the window handler to show an error; the controller remains stopped with JournalIntegrityText set to “Verified” and no journal attached for retry. A pending seal must not be returned as successful verification, or the controller must await it before committing its terminal state.
Useful? React with 👍 / 👎.
| // Advance the current projection before the controller promotes the newest V2. | ||
| // The shifted item is the already-journaled previous V2, so no process evidence | ||
| // is invented; this keeps current-pair assessment atomic for the live UI. | ||
| if (shiftedValue1 != null) | ||
| point.Runtime.SetFatValueEvidence(shiftedValue1); |
There was a problem hiding this comment.
Shift rolling evidence only after journal acceptance
When a completed automatic pair rolls forward, this mutates the real runtime Value 1 inside Observe, before IoTestSessionController.ApplyAutoCapture() attempts to append the new Value 2 event. If that append fails—for example after a background writer or disk failure—the method returns without promoting Value 2, but Value 1 has already changed from the old pair to the prior Value 2, leaving project state altered without the corresponding accepted journal operation. Return the shifted evidence in the decision without mutating the point, then apply both pointer changes only after the append succeeds.
Useful? React with 👍 / 👎.
|
Report-polish checkpoint on exact head
Exact-head CI is GREEN: Build ARSAS #2033, Validate IO List Testing #906, Validate SV evidence bundles #1131. Portable artifact: PR remains draft until the final report visual is accepted; ARIEC61850 pin remains unchanged at |
FAT relay-bench recovery — second software gate complete / physical re-bench required
Golden reference remains Build #1888 / ARSAS commit
712e2c557d5da83d2f02b81f3a58905e985d1e50with immutable ARIEC61850 pin11ab2304482600c19ba979f4fc9021ddb46b9af9. This PR remains a relay-bench candidate only and must not be merged until the physical gate below passes.The previous physical candidate
849be91469026e804feee80d7867ebc9dbae83ecfailed relay-bench acceptance: Start/Continue, post-command UI, Value 2 capture and Stop could freeze for tens of seconds/minutes, and a delayed FAT evidence projection could leave LIVE VALUE stale. The relay diagnostic showed the native command path itself completed in about 0.4 s, so the recovery below targets the FAT/WPF/evidence hot path rather than ARIEC control timeouts.Current candidate head:
0fa8cebd9a58fab91adc378d49773a823dfef488.Second-round relay-bench fixes
device.Pointsimage after Engineering's UI flush.CurrentValue, quality, source or IED timestamp back into the operator-facing FAT row. Those fields are owned only by the shared Engineering process image.Session.Startalready captures the baseline, so the first UI tick after Start no longer replays the entire current process image as fresh evidence.LivePointReadyrows. It does not repeat IED preparation, discovery, report selection or monitoring restart.IoTestMultiSessionCoordinatorforwards only the child property that actually changed instead of expanding every leaf notification into the full coordinator projection.Session.*bindings remain targeted and live.A=11,B=12,C=0 → A=11,B=12,C=13advances Value 2.TESTED BY,WITNESSED BY,APPROVED BYwith Name / Company / Signature / Date.Exact-head CI gate — GREEN on
0fa8cebdPortable candidate:
ARSAS-win-x64-portable-single-exe(9998864839)b219dec279f9f7e04d07e0fe6d2bb57b99c22b1eca1a6a27beabc5a1631c821eARSAS-1.6.33-win-x64-portable.exea1a70cde724ee5581561a3d49959de6f23dc6ed7efdbff8155587f7f35f1fdb7Physical relay re-bench gate
IED session active.Not Responding.Not Respondingteardown.Keep this PR draft. Do not merge until this exact
0fa8cebdbuild passes the physical relay re-bench.